package com.ma.model;

/**
 * @program: maskpaas
 * @description: 返回的数据结构
 * @author: Jingxi Zhu
 * @create: 2018-10-25 19:16
 * @Copyright © 2018 Jingxi Zhu. All rights reserved
 **/
public class Result<T> {

    /** 错误码. */
    private int code;

    /** 提示信息.*/
    private String info;

    /** 具体内容. 用泛型来表示*/
    private T data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "{" +
                "code=" + code +
                ", info='" + info + '\'' +
                ", data=" + data +
                '}';
    }
}
